#ifndef _MESSAGES_H
#define _MESSAGES_H

#define MAX_MESSAGE_SIZE 1024

//NM - NetworkMessage
enum NM
{
	NM_ERROR = 0,
	NM_EMPTY,
	NM_HELLO,
	NM_ENTITYDATA,
	NM_SHOOT,
	NM_NEW_ENTITY,
	NM_CURRENT_TICK,
	NM_COUNT
};

struct GameMessage
{
	NM messageType;
	char data[MAX_MESSAGE_SIZE];
};

struct TickMessage
{
	long currentTick;
};

struct NewEntityMessage
{
	short entityReference;
	char data[MAX_MESSAGE_SIZE];
};

struct EntityMessage //It's much easier to cast by creating multiple messages like this
{
	short entityReference;
	long tick;
	char data[MAX_MESSAGE_SIZE];
};

/************************
	MESSAGE STRUCTURE
************************/
//Create new entity Message
//messageType = NM_NEW_ENTITY
//data += bool, set to true if this is this client's controllable entity
//data += short stating the entity reference
//data += long stating which entity to create
//data += all other player data

//Create your player message (doubles as a greeting)
//messageType = NM_HELLO
//data += short stating the entity reference
//data += all other player data

//EntityData Message
//messageType = NM_ENTITYDATA
//data += short stating the entity reference
//data += all other entity data

#endif